 var endtime = new Date('2019-09-06 10:00:00').getTime()
     // console.log(endtime)
 var h = 0;
 var m = 0;
 var s = 0;

 function miao() {
     var nowtime = new Date().getTime();
     //     console.log(nowtime)
     var cha = (endtime - nowtime) / 1000;
     cha = parseInt(cha)
     h = parseInt(cha / 3600)
         //     console.log(h)
     m = (cha / 60) % 60
     m = parseInt(m)
         //     console.log(m)
     s = cha % 60
         //     console.log(s)
     if (h < 10) {
         h = '0' + h
     }
     if (m < 10) {
         m = '0' + m
     }
     if (s < 10) {
         s = '0' + s
     }
     if (cha <= 0) {
         clearInterval(t)
     }
     document.querySelector("#hour").innerHTML = h
     document.querySelector("#min").innerHTML = m
     document.querySelector("#sin").innerHTML = s
 }
 var t = setInterval(miao, 1000)